import 'package:flutter/material.dart';

class ResetPasswordPage extends StatefulWidget {
  ResetPasswordPage({Key? key}) : super(key: key);

  @override
  State<ResetPasswordPage> createState() => _ResetPasswordPageState();
}

class _ResetPasswordPageState extends State<ResetPasswordPage> {
  @override
  Widget build(BuildContext context) {
    Color color = Theme.of(context).backgroundColor;
    var height = MediaQuery.of(context).size.height - 130;
    var width = MediaQuery.of(context).size.width - 130;
    return Scaffold(
      appBar: AppBar(
        title: Text('修改密码'),
      ),
      body: SafeArea(
        child: Container(
          height: MediaQuery.of(context).size.height,
          decoration: BoxDecoration(color: Colors.green),
          child: Container(
              height: height,
              margin: EdgeInsets.all(10.0),
              padding: EdgeInsets.all(30.0),
              decoration: BoxDecoration(
                  color: Colors.white,
                  borderRadius: BorderRadius.all(Radius.circular(20.0))),
              child: ListView(
                children: [
                  TextField(
                      decoration: InputDecoration(
                          icon: Icon(Icons.manage_accounts),
                          hintText: '请输入账号')),
                  Padding(padding: EdgeInsets.all(10)),
                  TextField(
                      obscureText: true,
                      decoration: InputDecoration(
                          icon: Icon(Icons.mail), hintText: '请输入邮箱')),
                  Padding(padding: EdgeInsets.all(10)),
                  TextField(
                      obscureText: true,
                      decoration: InputDecoration(
                          icon: Icon(Icons.lock), hintText: '请输入新密码')),
                  Padding(padding: EdgeInsets.all(10)),
                  TextField(
                      obscureText: true,
                      decoration: InputDecoration(
                          icon: Icon(Icons.lock), hintText: '请确认新密码')),
                  Padding(padding: EdgeInsets.all(10)),
                  ElevatedButton(
                    style: ButtonStyle(
                        backgroundColor:
                            MaterialStateProperty.all(Colors.green)),
                    onPressed: () {},
                    child: Container(
                      width: width,
                      child: Center(
                        child: Text(
                          '修改密码',
                          style: TextStyle(color: Colors.white),
                        ),
                      ),
                    ),
                  ),
                  Padding(padding: EdgeInsets.all(10)),
                ],
              )),
        ),
      ),
    );
  }
}